@import 'src/mixin.less';

.topHeader {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  position: relative;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-variant: tabular-nums;
  font-feature-settings: "tnum", "tnum";
}

.suffix {
  font-size: 6px;

  .dot {
    color: #F1423C;
    font-weight: 700;
    font-size: 16px;
  }
}

.logo {
  position: relative;
  font-size: 20px;
  color: #111;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  user-select: none;
  animation: slideLeft .5s ease-in-out forwards;
}

.toggle {
  text-align: center;
  position: relative;
  width: 30px;
  height: 30px;
  line-height: 30px;
  background-size: 30px;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  z-index: 1000;
  animation: slideRight .5s ease-in-out forwards;
  transition-delay: .5s;
  opacity: 0;
  top: 0;
  right: 0;
  margin: 10px;

  &.active {
    background-color: rgba(134, 134, 134, .05);
  }
}

.navigation {
  position: absolute;
  display: flex;
  right: 30px;
  opacity: 0;
  visibility: hidden;
  transition: 0.5s;
  padding: 0;
  margin: 0;

  li {
    list-style: none;
    user-select: none;

    a {
      color: #111111;
      text-decoration: none;
      font-size: 16px;
      margin: 0 20px;
      font-weight: 600;
      display: inline-block;

      &:hover:before {
        visibility: visible;
        width: 100%;
      }

      &:before {
        content: "";
        position: absolute;
        height: 3px;
        width: 0;
        bottom: 0;
        left: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out 0s;
      }
    }
  }

  &.active {
    opacity: unset;
    visibility: unset;

    li a {
      animation: slideRight .5s ease-in-out forwards;
      animation-delay: calc(.2s * var(--i));
    }
  }
}


.mobile({
  .toggle {
    &.active {
      position: fixed;
      transition-delay: 0s;
    }
  }
  .topHeader {
    height: 70px;
  }

  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    &.active li a {
      margin: 5px 10px;
      display: inline-block;
      letter-spacing: 1px;
      font-size: 20px;
    }
  }
});

@keyframes slideRight {
  0% {
    transform: translateX(150px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideLeft {
  0% {
    transform: translateX(-150px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
